package day2;

import java.util.ArrayList;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class Jihe {
    //集合，为替代数组而生
    public static void main(String[] args) {
        List list =new ArrayList();
        list.add("hao");
        list.add(44.5);
        list.add(22);
        list.add(2>2);
        list.add("足球");
        System.out.println(list);
        System.out.println(list.size());
        Integer o=(Integer)list.get(2);
        System.out.println(o);
        System.out.println(">>>>>>>>>>>>>>>>>>>");
        for(int i=0;i<list.size();i++){
            System.out.println(i+","+list.get(i));
        }
        System.out.println(">>>>>>>>>>>>>>>>>>>");
        System.out.println();
        for(Object x:list)
            System.out.println(x);
        //contains,remove
        System.out.println(list.contains("足球"));
    }
}
